<style>
    .bgs .one {
        width: 500px;
        height: 300px;
        background-image: url(rose.jpg);
        background-repeat: no-repeat;
        background-position: center;
        background-size: contain;
    }
</style>
<div class="bgs">
    <div class="one">背景尺寸</div>
</div>